package string;

public class Demo06 {
    public static void main(String[] args) {

        String filename = "demo.Jpg";
        if(filename.toLowerCase().endsWith(".jpg")){
            System.out.println("是jpg图片");
        }
        if(filename.startsWith("demo")){
            System.out.println("1");
        }
    }
}
